interface ISwim {
	swimming: () => void
}

interface IRun {
	running: () => void
}

class People implements ISwim, IRun {
	swimming() {
		console.log('swimming')
	}

	running() {
		console.log('running')
	}
}

function swin(swimmer: People) {
  swimmer.swimming()
}

const p = new People()

swin(p)